/**
 * 调整计划入职日期
 */
import React from 'react';
import './index.less';

import {base} from 'nc-lightapp-front';


const { NCDatePicker } = base;
//import { Icon,  Row, Col  } from 'tinper-bee';

import zhCN from 'rc-calendar/lib/locale/zh_CN';

import moment from "moment";

const format = "YYYY-MM-DD";
const dateInputPlaceholder = "选择日期";

const {
    NCModal,
    NCButton,
    NCRow,
    NCCol
} = base;

const {
    Header,
    Body,
    Footer
} = NCModal;

export default (props) => {

    const {
        visible,
        content,
        language,
        closeModal,
        sendDate,
        beginDate,
        beginDateOri,
        onChange
    } = props;



    return (
        <NCModal
            show={visible}
            className="date-content-modal"
            size="sm"
            onHide={closeModal}
        >
            <Header
                closeButton={true}
            >
                {language['gx6008-000219']/** 调整计划入职日期 */}
            </Header>
            <Body>
                <div>
                    <span>{language['gx6008-000220']/** 原计划入职日期 */}:{beginDateOri}</span>
                </div>
                <div>
                    <span style={{display:'inline-block'}}>
                        {language['gx6008-000221']/** 新计划入职日期 */}
                    </span>
                    <span
                        className="header-middle-item-wrapper"
                    >
                        <NCRow>
                            <NCCol md={12}>
                            <NCDatePicker
                            format={format}
                            //onSelect={onSelect}
                            onChange={onChange}
                            locale={zhCN}
                            //defaultValue={beginDate}
                            placeholder={dateInputPlaceholder}
                            value={beginDate}
                            />
                            </NCCol>
                        </NCRow>
                    </span>
                </div>

            </Body>
            <Footer

            >
                <NCButton
                    colors="primary"
                    onClick={() => {
                        sendDate();
                    }}
                >
                    {language['gx6008-000128']/** 确认 */}
                </NCButton>
                <NCButton
                    onClick={closeModal}
                >
                    {language['gx6008-000025']/** 取消 */}
                </NCButton>
            </Footer>
        </NCModal>
    );
}
